package o;

import android.content.Context;
import android.os.Bundle;
import com.huawei.cloudservice.CloudAccountManager;
import com.huawei.hms.framework.network.restclient.hwhttp.dns.DnsConfig;
import com.huawei.hwid.core.helper.handler.ErrorStatus;
import o.der.f;

public class ell implements ela {
    protected Context ˋ;

    public ell(Context context) {
        this.ˋ = context;
    }

    public void ॱ(Object obj) {
        if (eod.ˋ(this.ˋ)) {
            CloudAccountManager.initial(this.ˋ, new Bundle(), new ccs(this) {
                final /* synthetic */ ell ˋ;

                {
                    this.ˋ = r1;
                }

                public void onFinish(Bundle bundle) {
                    boolean ˋ = ced.ˋ(this.ˋ.ˋ, "com.huawei.hwid_default", null, cef.ˎ("com.huawei.hwid_default"));
                    Logger.ˎ("MyInfoDispatcher", "MyInfoDispatcher dispatch enter hwid Settings ui ,  startResult=" + ˋ);
                    if (!ˋ) {
                        this.ˋ.ˊ();
                    }
                }

                public void onError(ErrorStatus errorStatus) {
                    Logger.e("MyInfoDispatcher", new StringBuilder(DnsConfig.MAX_CACHE_ENTRIES).append("initial onError, ErrorCode: ").append(errorStatus.getErrorCode()).append(", ErrorReason: ").append(errorStatus.getErrorReason()).toString());
                    super.onError(errorStatus);
                }

                protected String ˋ() {
                    return "initial";
                }
            });
            return;
        }
        Logger.ˎ("MyInfoDispatcher", "MyInfoDispatcher dispatch to logout hwid because of hwid not installed");
        ˊ();
    }

    private void ˊ() {
        cku ˋ = cku.ˋ(null, this.ˋ.getString(f.ㆍॱ));
        ˋ.ˎ(this.ˋ);
        ˋ.ॱ(new cks(this) {
            final /* synthetic */ ell ˋ;

            {
                this.ˋ = r1;
            }

            public void enableNetworking() {
                if (eod.ˋ(this.ˋ.ˋ)) {
                    eod.ˎ(this.ˋ.ˋ);
                } else {
                    eod.ˏ(this.ˋ.ˋ);
                }
            }

            public void upgrade() {
            }

            public void ˋ() {
            }
        });
    }

    public void ॱ() {
        eli o_eli = new eli(this.ˋ);
        if (ekt.ˎ()) {
            o_eli.ˏ(this);
        } else {
            Object o_elg = new elg(this.ˋ);
            o_eli.ˏ(o_elg);
            o_elg.ˏ(null);
        }
        o_eli.ॱ(null);
    }
}
